home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
matrix.arc
/
M_DETERM.C
< prev
next >
Wrap
C/C++ Source or Header
|
1985-01-13
|
4KB
|
20 lines
static char *sccsid = "@(#)m_determinant.c 4/5/82 (U of Maryland, FLB)";
#include "mat.h"
double
m_determinant(mat)
register struct matrix *mat;
{
register int col;
double det = 0.0;
if (mat->m_rows == 1)
return(m_v(mat, 0, 0));
for (col = 0; col < mat->m_cols; col++)
det += m_v(mat, 0, col) * m_cofactor(mat, 0, col);
return(det);
}